﻿using Quartz;

namespace ApiServer.HostedService
{
    public class MyJob : IJob
    {
        static int i;
        public Task Execute(IJobExecutionContext context)
        {
            return Task.Factory.StartNew(action);
        }
        public void action()
        {
            Console.WriteLine($"这是我{i++}次定时任务");
        }
    }
}
